Methods and apparatus for meter I/O board addressing and communication

ABSTRACT

The present invention, in one embodiment, is a method for input/output (I/O) board addressing and communications in an electronic electric meter having a microcomputer. The method includes steps of providing interchangeable I/O boards of an electronic electric meter with type identifiers; and determining, using a microcomputer of the meter and the type identifier of the I/O board, a type of interchangeable I/O board being utilized in the meter.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Application No.60/141,600, filed Jun. 30, 1999, entitled “Methods and apparatus forinput/output board addressing and communications in an electronicelectricity meter,” and which is hereby incorporated by reference in itsentirety.

BACKGROUND OF THE INVENTION

This invention relates generally to electricity metering, and moreparticularly, methods and apparatus for addressing and communicatingwith meter components.

Electronic electricity meters for metering multi-phase servicestypically include a digital signal processor (DSP) and a microcomputer.Certain functions and operations are separately performed in the DSP andmicrocomputer. By dividing the functionality between the DSP andmicrocomputer, communications of data and commands must be providedbetween the DSP and microcomputer. Such an architecture is complex.

In addition, such meters typically are programmed to perform certainfunctions. Although the meters are upgradeable, the types of upgradesthat can be performed are limited to the tables and functions prestoredin the meter. In addition, and in the past, increased functionalitytypically was a trade-off to cost. That is, adding functionality to themeter typically resulted in adding significant costs to the meter.

It would therefore be desirable to increased the flexibility of anelectronic electricity meter by providing methods and apparatus forcommunicating and addressing a variety of input/output options. It wouldalso be desirable if such methods and apparatus were provided to addressand communicate with different types of I/O boards to provide increasedfunctionality, as needed.

BRIEF SUMMARY OF THE INVENTION

There is therefore provided, in one embodiment of the present invention,a method for input/output (I/O) board addressing and communications inan electronic electricity meter having a microcomputer. The methodincludes steps of providing interchangeable I/O boards of an electronicelectricity meter with type identifiers; and determining, using amicrocomputer of the meter and the type identifier of the I/O board, atype of interchangeable I/O board being utilized in the meter.

The above-described embodiment provides increased flexibility bycommunicating and addressing a variety different types of I/O boards.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an electricity meter.

FIG. 2 is a data flow diagram for the electricity meter shown in FIG. 1.

FIG. 3 is a functional block diagram of the meter shown in FIG. 1.

FIG. 4 is a table illustrating the I/O board addressing mode.

FIG. 5 is a mode diagram for a simple I/O board.

FIG. 6 is a mode diagram for a complex I/O board.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 is a block diagram of an electricity meter 100. Meter 100 iscoupled to a three phase, alternating current (AC) power source 102.Particularly, current sensors 104 and voltage sensors 106 are coupled topower source 102 and generate measures of current and voltage,respectively. Current- and voltage sensors 104 and 106 are well known inthe art. In addition, a power supply 108 and a revenue guard optionboard 110 also are coupled to power source 102.

Current and voltage measurements output by sensors 104 and 106 aresupplied to an analog-to-digital (A/D) converter 112. Converter 112, inthe exemplary embodiment, is an 8 channel delta-sigma type converter.Converter 112 is coupled to a microcomputer 114. In the illustratedembodiment, microcomputer 114 is a 32 bit microcomputer with 2 Mbit ROM,64 Kbit RAM. A 32 kHz crystal 116 provides a timekeeping signal formicrocomputer 114. Microcomputer 114 is coupled to a flash memory 118and a electronically erasable programmable (i.e., reprogrammable) readonly memory 120.

Meter 100 also includes an optical port 122 coupled to, and controlledby, microcomputer 114. Optical port 122, as is well known in the art, isused for communicating data and commands to and from an external readerto microcomputer 114. Communications via port 122 are performed inaccordance with ANSI C12.18 (optical port) and ANSI C12.19 (standardtables). A liquid crystal display 124 also is coupled to microcomputer114 via an LCD controller 126. In addition, an option connector 128,coupled to microcomputer 114, is provided to enable coupling optionboards 130 (e.g., a telephone modem board 132 or an RS-232 line 134, ora simple input/output (I/O) board 136 or a complex I/O board 138) tomicrocomputer 114. Option connector 128 also includes a sample output140. When configured to operate in a time-of-use mode, a battery 142 iscoupled to power source 102 to serve as a back-up to maintain date andtime in the event of a power outage.

FIG. 2 is a data flow diagram 200 for the electricity meter 100. Asillustrated by FIG. 2, quantities such as watt hours per phase (WhA,WhB, WhC) as well as other quantities are determined by microcomputer114. These quantities are sometimes referred to herein as internalquantities 202. Microcomputer 114 then uses the pre-defined oruser-selected functions F(n) to calculate a set of quantities (referredto as calculated quantities 228). Microcomputer 114 then uses themeasurement profile 204 to select up to 20 quantities to store asuser-selected quantities. In addition, external inputs 206 can bespecified to be accumulated by measurement profile 204. In theembodiment shown in FIG. 2, up to four external inputs (E1, E2, E3, E4)are collected. These may also be scaled by programmed multipliers anddivisors.

User-selected quantities 230 specified by measurement profile 204 can beused to perform totalization. For example, a value from a registerlocation in user-selected quantities 230 (e.g., register 7) can be addedto a value stored in a register location (e.g., register 17) to providea totalized value, and the totalized value is stored in a registerlocation (e.g., register 17). In the embodiment illustrated in FIG. 2,up to 8 totalizations can be performed.

Also in the embodiment shown in FIG. 2, five demand values (locations0-4) 210 can be calculated from the quantities in user-selectedquantities 230. The values to use for the demand calculations arespecified by the demand select. Each demand value may have up to twocoincident demands 212, 214 per demand 210. The coincident demands arespecified by the coincident select. A coincident demand value may beanother one of the selected demands, or the quotient of two selecteddemands. An average power factor 222 is stored in numerator anddenominator form. Time-of-use summaries (A-D) 216 for the selecteddemands are also available in a time-of-use meter. Up to 20 quantitiescan be recorded in load profile data 218. The quantities to be recordedare specified by the load profile select. Up to five summations 226 canbe calculated. The quantities to be calculated are specified by thesummations select. Time of use summaries (A-D) 216 for the selectedsummations are also available in a time-of-use meter. Data accumulations224, summations 226, demands 210 coincident demands 212, 214, andtime-of-use summaries 216 may be selected for display 210 on the meter'sLCD.

Meter 100 can be programmed by an operator, e.g., a utility, so thatmeter 100 determines desired quantities, regardless of whether thatquantity is a common, IEEE-defined value such as apparentvolt-ampere-hours, or a quantity used only by a particular utility.Generally, a momentary interval is defined as 60 cycles (for 60 Hzinstallations) or 50 cycles (for 50 Hz installations) of the fundamentalvoltage frequency. Known meters calculate a pre-defined set ofquantities from the basic quantities every momentary interval. Thesequantities include total watt-hours (fundamental plus harmonics),apparent volt-ampere-hours, and arithmetic apparent volt-ampere hours.These quantities are summed by the minute. One-minute accumulations ofdata are stored in a structure called the minute first-in, first-out(FIFO) register. An example of the structure of a minute FIFO isillustrated below.

1-minute accumulation of watt-hours 1-minute accumulation of var-hours1-minute accumulation of apparent volt-ampere-hours 1 minuteaccumulation of watt hours 1 minute accumulation of var-hours 1 minuteaccumulation of apparent volt-ampere-hours 1-minute accumulation ofwatt-hours 1-minute accumulation of var-hours 1-minute accumulation ofapparent volt-ampere-hours

Data is retrieved from the minute FIFO and added to other accumulators,from which summations (e.g. total kilowatt-hours), demand calculations(e.g. maximum kilowatt demand), and load profile recording operationsare performed.

Typically there is very little flexibility provided by electricitymeters in how the momentary interval basic quantities are processed togenerate the revenue quantities that are of interest to utilities. Auser may, for example, select from several pre-defined quantities thatare computed every momentary interval, and the user may select thelength of the demand interval or subinterval and the length of the loadprofile interval.

In contrast, meter 100 enables a user to define methods of datacalculations at all points in the data processing sequence, e.g, at theend of a momentary interval, at the end of a minute, at the end of ademand (sub)interval, and at the end of a load profile interval.

In another embodiment, code is downloaded into an external flash memory,and then a measurement profile is programmed to use the calculationspecified by the code. Vectors are used to update and perform a list oftasks in ROM, or are replaced by versions in flash memory for otherfunction blocks.

FIG. 3 is a functional block diagram 300 of meter 100. The f( ) blocksin FIG. 3 illustrate the points during data processing at whichuser-defined functions can be applied to data. For example, if a userwants to compute apparent volt-ampere-hours (defined as the vector sumof watt-hours, var-hours, and distortion volt-ampere hours), the userdefines a function that would be executed at the end of each momentaryinterval. This quantity could then be accumulated for summations,demands, or load profile data. Accumulations of apparentvolt-ampere-hours could also be used to compute some other quantity at adifferent point (e.g. a demand interval accumulation of apparentvolt-ampere-hours could be used to compute an average power factor forthat demand interval). Examples of some of the mathematical operatorsthat would be available are set forth in the table below. Thesefunctions are programmed into the meter non-volatile memory.

Meter 100 can also accumulate data provided by external devices such asother electricity meters, gas meters, and water meters. Typically thisis done through hardware that provides pulses to the electricity meter,which counts the pulses (each pulse represents some pre-defined value,e.g. 1 watt-hour). Meter 100 allows mathematical operations to bedefined that operate on accumulations of these pulses. For example, autility might have an installation where three electricity meters arerequired. By having two of the meters provide pulse data to the thirdmeter representing watt-hour usage, and defining in the third meter acalculation to add the pulse data from the other two meters to its ownwatt-hour data, the utility can read the total watt-hour usage of theinstallation from one meter.

Because a user can specify mathematical operations to be performed ondata at a number of steps in the processing of metering data, meter 100provides that a wide variety of quantities can be determined. Meter 100also prevents the meter manufacturer from having to anticipate at theproduct development stage what quantities a utility might require. Sincethere are constraints that a user must be aware of when programming ameter to compute a given quantity, it is likely that the metermanufacturer would implement for the utility the program that definesthe calculations. The utility would then install the program into itsprogramming software package, which would ultimately download theprogram into meter 100.

TABLE 1 Momentary interval basic quantities watt-hours, element A,fundamental + harmonics watt-hours; element B, fundamental + harmonicswatt-hours; element C, fundamental + harmonics var-hours, element A,fundamental + harmonics var-hours, element B, fundamental + harmonicsvar-hours, element C, fundamental + harmonics watt-hours; element A,fundamental only watt-hours; element B, fundamental only watt-hours;element C, fundamental only var-hours, element A, fundamental onlyvar-hours, element B, fundamental only var-hours, element C, fundamentalonly volt-squared-hours, element A, fundamental + harmonicsvolt-squared-hours, element B, fundamental + harmonicsvolt-squared-hours, element C, fundamental + harmonicsampere-squared-hours, element A, fundamental + harmonicsampere-squared-hours, element B, fundamental + harmonicsampere-squared-hours, element C, fundamental + harmonicsampere-squared-hours, element A, fundamental only ampere-squared-hours,element B, fundamental only ampere-squared-hours, element C, fundamentalonly volt-squared hours, element A, fundamental only volt-squared hours,element B, fundamental only volt-squared hours, element C, fundamentalonly sample count imputed neutral ampere-squared-hours

TABLE 2 Other data definitions Functions of momentary interval basicquantities (user defined) momentary interval calculation 1 momentaryinterval calculation 2 . . . momentary interval calculation K Functionsof momentary interval basic quantifies (meter defined) momentaryinterval total wh all harmonic momentary interval total varh allharmonic momentary interval total Wh fundamental momentary intervaltotal varh fundamental Distortion Vah A Distortion Vah B Distortion Vahc Total Distortion VAh Meter-defined minute quantities one minuteaccumulation of pulses from channel 1 one minute accumulation of pulsesfrom channel 2 . . . One minute accumulation of pulses from channel Ldelivered Wh lagging varh during delivered Wh leading varh duringdelivered Wh received Wh lagging varh during received Wh leading varhduring received Wh User-defined minute quantities one minute sum 1 ofmomentary interval basic quantities one minute sum 2 of momentaryinterval basic quantities . . . one minute sum M of momentary intervalbasic quantities one minute sum 1 of moment. Int. qtys (user-defined)one minute sum 2 of moment. Int. qtys (user-defined) . . . one minutesum N of moment. Int. qtys (user-defined) one minute sum 1 of moment.Int. qtys (meter-defined) one minute sum 2 of moment. Int. qtys(meter-defined) . . . one minute sum P of moment. Int. qtys(meter-defined) Functions of one minute user-defined sums (user-defined)function 1 of other one minute user-defined sums function 2 of other oneminute user-defined sums . . . function Q of other one minuteuser-defined sums Functions of one minute meter-defined sums(user-defined) function 1 of other one minute meter-defined sumsfunction 2 of other one minute meter-defined sums . . . function R ofother one minute meter-defined sums Functions of minute fifo sums(user-defined) function 1 of minute fifo sums function 2 of minute fifosums . . . function S of minute fifo sums Demand interval sums (storedin subinterval queue) demand interval sum 1 of one minute user-definedqtys demand interval sum 2 of one minute user-defined qtys . . . demandinterval sum T of one minute user-defined qtys demand interval sum 1 ofone minute meter-defined qtys demand interval sum 2 of one minutemeter-defined qtys . . . demand interval sum U of one minutemeter-defined qtys Functions of demand interval sums (user-defined)function 1 of other demand interval sums function 2 of other demandinterval sums . . . function V of other demand interval sums minimumvalue 1 during demand interval minimum value 2 during demand interval .. . minimum value W during demand interval maximum value 1 during demandinterval maximum value 2 during demand interval . . . maximum value Xduring demand interval Load profile interval sums (stored in loadprofile accumulators) load profile interval sum 1 of one minuteuser-defined qtys load profile interval sum 2 of one minute user-definedqtys . . . load profile interval sum Y of one minute user-defined qtysload profile interval sum 1 of one minute meter-defined qtys loadprofile interval sum 2 of one minute meter-defined qtys . . . loadprofile interval sum Z of one minute meter-defined qtys Functions ofload profile interval sums (user-defined) function 1 of other loadprofile interval sums function 2 of other load profile interval sums . .. function A of other load profile interval sums minimum value 1 duringload profile interval minimum value 2 during load profile interval . . .minimum value B during load profile interval maximum value 1 during loadprofile interval maximum value 2 during load profile interval . . .maximum value C during load profile intervalmin and max values may be voltage, frequency, current, etc.

TABLE 3 Example mathematical operations WORD square WORD_SQUARE_ROOTpointer to results: root pointer to operand (DWORD*) final answerpointer to result (WORD*) working space location 1 working spacelocation 2 WORD 2-D WORD_2D_VECTOR_SUM . . . vector sum pointer tooperand 1 (INT*) working space pointer to operand 2 (INT*) location Npointer to result (WORD*) DWORD 2-D DWORD_2D_VECTOR_SUM data typesvector sum pointer to operand 1 (LONG*) BYTE: unsigned pointer tooperand 2 (LONG*) 1-byte qty pointer to result (DWORD*) INT: signed2-byte qty WORD: unsigned 2-byte qty LONG: signed 4- byte qty DWORD:unsigned 4-byte qty WORD 3-D WORD_3D_VECTOR_SUM vector sum pointer tooperand 1 (INT*) pointer to operand 2 (INT*) pointer to operand 3 (INT*)pointer to result (WORD*) DWORD 3-D DWORD_3D_VECTOR_SUM vector sumpointer to operand 1 (LONG*) pointer to operand 2 (LONG*) pointer tooperand 3 (LONG*) pointer to result (DWORD*) WORD 3-DWORD_3D_VECTOR_DIFF vector pointer to operand 1 (INT*) differencepointer to operand 2 (INT*) pointer to operand 3 (INT*) pointer toresult (WORD*) DWORD 3-D DWORD_3D_VECTOR_DIFF vector pointer to operand1 (LONG*) difference pointer to operand 2 (LONG*) pointer to operand 3(LONG*) pointer to result (DWORD*) INT multiply INT_MULT pointer tooperand 1 (INT*) pointer to operand 2 (INT*) pointer to result (LONG*)general MULT_MB (written in C) multiply size of operand 1 (BYTE) pointerto operand 1 (BYTE*) size of operand 2 (BYTE) pointer to operand 2(BYTE*) pointer to result (BYTE*) INT divide INT_DIVIDE pointer tooperand 1 (LONG*) pointer to operand 2 (INT*) pointer to result (INT*)general divide DIV_MB (not available size of operand 1 (BYTE) atmomentary pointer to operand 1 (BYTE*) interval size of operand 2 (BYTE)boundary) pointer to operand 2 (BYTE*) pointer to result (BYTE*) INT addINT_ADD pointer to operand 1 (INT*) pointer to operand 2 (INT*) pointerto result (INT*) INT to LONG INT_TO_LONG_ADD add pointer to operand 1(LONG*) pointer to operand 2 (INT*) pointer to result (LONG*) LONG addLONG_ADD pointer to operand 1 (LONG*) pointer to operand 2 (LONG*)pointer to result (LONG*) general add ADD_MB (not available size ofoperand 1 (BYTE) at momentary pointer to operand 1 (BYTE*) interval sizeof operand 2 (BYTE) boundary) pointer to operand 2 (BYTE*) pointer toresult (BYTE*) LONG subtract LONG_SUB pointer to operand 1 (INT*)pointer to operand 2 (INT*) pointer to result (INT*) general subtractSUB_MB size of operand 1 (BYTE) pointer to operand 1 (BYTE*) size ofoperand 2 (BYTE) pointer to operand 2 (BYTE*) pointer to result (BYTE*)assignment ASSIGN data type (1, 2, or 4 byte qty) constant pointer todestination fill FILL number of bytes to fill (BYTE) fill value (BYTE)pointer to destination (BYTE*) if-then-else IF pointer to operand 1comparison pointer to operand 2 comparison TRUE operation 1 comparisonTRUE operation 2 . . . comparison TRUE operation N ENDIF or ELSE elseoperation 1 else operation 2 . . . else operation P ENDIF no operationNOPFlash Memory

In one embodiment, a nonvolatile, alterable flash memory 118 is utilizedto store configuration, diagnostic, metering and other data. Flashmemory 118 provides the advantage that a tremendous amount of data canbe stored, which eliminates a need for a daughter board to addadditional memory. Also, a data manager maps requests for data to thephysical location of the data. By utilizing the data manager, data canmove from one storage medium to another without affecting the meteringapplication.

Flash memory 118 is typically organized into multiple large sectors (64KB) which can be erased in their entirety. When flash memory is erased,all bits in a sector are set to 1. When data is written, 1 bits arechanged to 0 bits. Once a bit has been changed to a 0, it cannot bechanged back to a 1 without erasing the entire sector.

For practical purposes, a given location in flash memory can be writtento once after it has been erased. To update even a single byte in arecord, a new copy of the entire record is written to an unusedlocation. There are many known methods for tracking used, unused andobsolete memory in each sector including file allocation tables (FAT)and linked lists. When a sector becomes full, it is necessary totransfer all “active” records to an unused sector and then erase the“dirty” sector.

Data within meter 100 is organized into logical blocks (e.g. CurrentSeason rate A data, Previous Reset data, Previous Season Data) that aretreated as atomic data units (ADU) by the data manager. Each ADU ismanaged separately. The data manager is responsible for maintaining apointer to the physical location of the current copy of each ADU. Forthe metering application to update an ADU stored in flash memory 118, anew copy of the ADU is written to an unused portion of flash memory 118.Since the physical location of the ADU has changed, the pointer to thecurrent ADU is updated. Keeping a pointer to the current ADU eliminatesthe need to traverse a linked list through flash memory 118 to find thecurrent ADU at the end of the chain.

The list of pointers to current ADUs maintained by the data manager maybe kept in RAM or non-volatile memory. The list, however, is saved innon-volatile at power failure. If stored in flash memory 118, eachchange to a single ADU requires rewriting the entire list of pointers.Another approach is to maintain the list of pointers in EEPROM 120. WithEEPROM 120, only the pointers to affected ADUs must be updated.

ADUs can be combined into logical groupings that are stored in a commonset of flash sectors. These logical groupings can be based on, forexample, the frequency with which the ADUs are updated and, the size ofthe ADUs. Each logical grouping of ADUs has at least two sectorsdedicated to data storage. One or more sectors are “active”, and theremaining sector is erased and available when the last “active” sectorfills up. Possible groupings of ADU's include power fail data andcommunications snap shots, configuration and revenue data, self-readsand event logs, and load profile data.

The data manager also performs a garbage collection task that monitorseach group of sectors. When the active sector(s) in a group is full, thegarbage collection task initiates the copying of all active ADUs in theoldest sector to a new sector. The copying is done atomicly, one ADU ata time. When an ADU is copied to the new sector, the pointer to thecurrent ADU is updated to match its physical location in the new sector.

Meter 100 can service a power failure in the middle of garbagecollection and pick up where it left off without losing any data, andminimizes the amount of time the power fail interrupt is disabled topermit the meter sufficient time to close down in an orderly fashion.

Determining when a sector is full can be done in one of many ways. A“high water” mark can be set for a sector. When the sector crosses thathigh water mark, garbage collection is initiated. The high water markcould be determined by the size of the largest ADU for a group.Alternatively, the data manager could wait to consider a sector fulluntil it is unable to satisfy a request to allocate storage. If too muchspace is wasted at the end of the sector, the erase time will increase.

If a second set of pointers are used for data that affects theconfiguration of meter 100, this second set of pointers can be used toallow the “commitment” and “roll-back” of configuration information. Atthe beginning of a session to change the configuration, the pointers tothe current configuration information are copied. When the configurationinformation is updated, the updated copy is written to flash and the“copy” pointer is updated. After all configuration information has beenwritten, a command to indicate that the configuration is complete isissued. At that point, the current pointers are updated with copies ofthe updated pointers. If the configuration process is interrupted beforeit completes, meter 100 maintains the current configuration. The oldconfiguration information is still available in flash since the originalpointers and data were not changed.

Nonvolatile, alterable flash memory and vectors also can be utilized toupdate the firmware of microcomputer 114 while meter 100 is in service.As explained above, meter 100 uses vectors to functions and/or tasks toprovide a level of indirection that can be used to upgrade or patch thecode. Meter 100 includes two forms of program memory, specifically,on-chip masked ROM or flash and off-chip flash 118. The on-chip maskedROM typically has a speed advantage over off-chip memory. Time criticalfunctions are stored in the on-chip masked ROM. Other, non-time criticalfeatures are stored in either on-chip masked ROM or off-chip flash 118.For the initial release of the firmware, the on-chip masked ROM could befilled with as much firmware as is practical.

The off-chip flash 118 can be used to store vectors to functions, tasksand/or tables of tasks to be executed and non-time critical functionsand tasks. The vectors in the table point to functions or tasks storedin on-chip masked ROM or off-chip flash 118. At power up, these vectorsand tables are read into memory. Rather than call a function and/or taskdirectly, the firmware uses the vectors to call functions and/or tasks.

The firmware can be upgraded in multiple ways. For example, a functionor task stored in off-chip flash can be directly over written, replacingthe old code with new code, or a new function or task can be written tooff-chip flash and the corresponding vector updated to point to the newfunction or task.

A built-in “bootloader” allows new code to be downloaded into theoff-chip flash. Meter 100 ceases metering when the bootloader isinitiated. The bootloader accepts blocks of new code and writes them tothe off-chip flash 118. When the download is complete, meter 100“reboots” and begins executing with the new code.

Commercially available off-chip flash memories permit programmingwithout any special voltages. In addition, such off-chip flash memoriescombine two “banks” of memory that act like separate chips. One bank ofthe chip can be used for code storage. The other bank can be used fordata storage. Each bank operates independent of the other. One can beprogrammed while the other is being read. One such chip can be used tostore off-chip code and data.

In other embodiments, a large electrically erasable programmable (i.e.,reprogrammable) read only memory (EEPROM) is used for part of thenonvolatile, alterable memory. In this embodiment, some of the data thatis described above as being stored in flash memory is stored, instead,in the EEPROM. However, the load profile is still stored in flash memory118.

It should be recognized that in still other embodiments, other types ofnonvolatile, alterable memory can be substituted for EEPROM and flashmemory 118. The memory or memories used should retain their contentsduring periods when power is not applied, and it should be possible toupdate their contents as needed, although not necessarily in the mannerrequired by a flash memory. One skilled in the art would be able toselect appropriate memories and make the necessary circuit modificationsto use the selected memory or memories.

I/O Board Addressing

As described above with reference to FIG. 1, meter 100 includes anoption connector 128 which connects to both simple and complexinput/output board (I/O) boards 136 and 138. Flash memory 118 enablesfunctional expansion of meter 100, and such expansion is furtherfacilitated by enabling use of multiple types of I/O boards 130. Tofacilitate such board interchangeability, microcomputer 114 isprogrammed to determine the type of I/O board 130 which is beingutilized. FIG. 4 illustrates the status of microcomputer pins utilizedin connection with communication with I/O board 130. The pin positionsrelate to the identified signals. Microcomputer 114 is operable in anormal mode, and ID mode, and address mode, a read mode, and a writemode with respect to such I/O board 130.

As explained above, multiple types of boards can be provided, and eachboard type has an identifier. In one specific embodiment, a 3-bitaddress specifies the board type. For example, an input/output board isspecified as a type 001. A logic 0 on all response lines means no optionboard of the specified type is present. A simple I/O board 136 has anidentifier of 01. A complex I/O board 138 has an identifier of 10.

FIG. 5 is an exemplary mode diagram for signals of a simple I/O board136. The signal supplied to I/O board 136 controls the mode of operationof the board, e.g., ID mode, address mode, read mode, and write mode.“X” means “don't care”, and “N/A” means “not available”. In the writemode, for KYZ outputs, a logic 1 closes the K-Z contact and opens theK-Y contact. For a 2-wire output, a logic 1 closes the output contact.

FIG. 6 illustrates an exemplary mode diagram for signals at a complexI/O board 138. Again, the signal supplied to I/O board 138 controls themode of operation of the board, e.g., ID mode, address mode, read mode(nib 0), read mode (nib 1), write mode (nib 0), and write mode (nib 1).In the read mode, logic 1 indicates the corresponding input isactivated. For 2-wire inputs, only the Z inputs are used. In the writemode, for KYZ outputs, a logic 1 closes the K-Z contact and opens theK-Y contact. For 2-wire outputs, a logic 1 closes the output contact.

Fast Optocom

As shown in FIG. 1, meter 100 includes an optical port 122 forcommunications with external hand held units and other devices. Toenable such communications, both the external unit and optical port 122include phototransistors. Meter 100 can store significant volume of data(e.g., 2 months of load profile data for 20 channels), and it isdesirable to quickly transmit such data to a hand held unit during acommunication session. A phototransistor, however, requires that thevoltage across the transistor must change in order to switch from afirst state to a second state.

To facilitate faster communications, op-amps are connected to thephototransistors. Each op-amp is configured as a current to voltageconverter. The op-amp therefore maintains a constant voltage across thephototransistor. As a result, the output can change between a firststate and a second state with minimal impact on phototransistor voltage.

Waveform Capture

Microcomputer 114 is programmed to capture waveform data (gain and phasecorrected samples) upon the occurrence of a predetermined event. Anevent may, for example, be that the voltage in one of the phases fallsbelow a predetermined percentage of a reference voltage, the voltage inone of the phases rises above a predetermined percentage of a referencevoltage, or a power fail transient is detected. Waveform capture isactivated by setting a waveform capture flag, and if the flag is set, awaveform counter is set to a predetermined count, e.g., 70. Upon theoccurrence of the event, and if the waveform capture flag is set and ifthe counter has a value greater than 0, then voltage samples and currentsamples for each phase are stored in RAM. These samples are stored afterDAP 112 interrupts the main process running in microcomputer 114 and theDSP interrupt service routine is invoked. The counter is decremented,and if the counter still has a value greater than 0, then the voltagesamples and current samples for each phase at that time are stored.These samples are also stored after the DAP 112 interrupts the mainprocess and the DSP interrupt routine is serviced. Operations continuein this manner so that upon the occurrence of an event, the desiredwaveform data is collected.

In one embodiment, microcomputer 114 can be programmed to collect moreor less than 70 samples per waveform from a set of six waveforms (threecurrent waveforms and three voltage waveforms). For example, the amountof data collected can be programmed based on the type of triggeringevent.

Revenue Guard Plus

Microcomputer 114 is programmable to determine energy consumption andother metering quantities for many different form types. In addition,and if one phase voltage is lost during metering operations and theother two phase voltages are still available, microcomputer 114automatically converts from a three voltage source metering operation toa two voltage source metering operation. For example, and if metering isbeing performed with three input voltage sources V_(a), V_(b), andV_(c), and if one of the phase voltages, e.g., V_(a), is lost,microcomputer 114 automatically changes to metering to the appropriateform type, i.e., generating metering quantities using V_(b) and V_(c).

More specifically, an in an exemplary embodiment, microcomputer 114 isoperable to perform metering in accordance with multiple form types. Acase number is assigned to each form type depending, for example, uponthe number of elements and the number of wires. For example, form type 6corresponds to a WYE configuration when all voltages V_(a), V_(b), andV_(c) are present. Form types 7, 2, and 8 correspond to meteringoperations performed when V_(a), V_(b), and V_(c), respectively, areabsent. If microcomputer 114 is operating in accordance with type 6 andvoltage V_(a) is lost (V_(a)=−[V_(b)+V_(c)]), then microcomputerautomatically converts to metering in accordance with form type 7.Similarly, if voltages V_(b) or V_(c) are lost, then microcomputer 114automatically converts to metering in accordance with form type 2 orform type 8, respectively. Therefore, rather than discontinuing meteringand possibly losing metering data, meter 100 automatically converts toanother form type in the event that one of the phase voltages is lost.In one embodiment, meter 100 converts to a 2½ element meter. After aprogrammable interval, voltage is checked again and an appropriate type(6, 2, 7 or 8) is then invoked.

In one embodiment, determining whether voltage V_(a) is lost compriseschecking three consecutive times at a 15 second interval after switchingback to DSP form type 6. Also, in one embodiment, V_(a) is considered“lost” when it drops to one-half of the normal voltage. In yet anotherembodiment, at least one of the number of consecutive checks made beforeV_(a) is deemed lost, the interval between the checks, and the voltageat which V_(a) is deemed lost is programmable.

Long Communication Session

When an external reader attempts to obtain data from meter 100, andsince a large volume of data can be stored in the meter memory, it isdesired to provide the reader with a snap shot of data at a particularpoint in time, rather than accessing the different metering data atdifferent points in time during one communication session. If differentdata is accessed at different points in time, then it is possible thatthe metering data will not be consistent, especially if thecommunication session is long, e.g., 1 hour. For example, a load 142continues to consume energy during a read operation, and if thecommunication session requires more than a few minutes to complete, themetering data collected at the beginning of the session will notnecessarily correspond to the metering data collected at the end of thesession.

Accordingly, in one embodiment, upon receipt of a request for acommunication session, e.g., reading a revenue table or a communicationrequiring a billing read command, microcomputer 114 generates a staticcopy of selected revenue-related data. For example, the current loadprofile data is written to EEPROM 120, or a static copy is made in RAM.This snapshot of data is then read out by the reader/host via port 122.

In one embodiment, microcomputer 114 generates the static copy ofselected revenue-related data in response to a PSEM command.

By storing the snapshot of data and providing such snapshot of data tothe external device, the read data all corresponds to a particular pointin time and is consistent, i.e., the data read at minute 1 of thesession is obtained under the same circumstance as the data read atminute 60 of the session.

Rollback

In the event that meter 100 is to be updated or reprogrammed duringoperation, the following procedure is performed to ensure that theupdate, or new program, is executed as quickly as possible uponinitiation of the change. Specifically, EEPROM 120 includes storagelocations for active and inactive metering programs, i.e., an activeprogram segment and an inactive program segment. The program currentlybeing utilized by meter 100 is stored in the active program segment ofEEPROM 120. The active program controls include, for example, displayscroll parameters, time-of-use data, a calendar, season change, andholidays. Billing data is generated in accordance with the activeprogram.

In the event that an update to the active program is required, or in theevent that an entirely new program is to be utilized, then a host writesthe updated/new program to the inactive segment in EEPROM 120. Uponinitiation of writing the updated/new program to EEPROM 120, metermicrocomputer 114 also interrupts the then active program and themetering data is stored in the meter memory. Upon successful completionof the program update, or loading the new program, microcomputer 114designates the inactive segment containing the new program as the activesegment, and causes metering operations to then proceed. The meteringdata stored in the meter memory during the update is processed by thenew program.

By interrupting metering program operations during the update, andstoring the metering data collected during the update and processingsuch data with the new program once the new program is loaded, the newprogram is utilized in metering operations as soon as possible. Suchoperation sometimes is referred to as “rollback” because meter 100“rolls back” to a previous configuration if a change to a currentconfiguration is interrupted before it is completed. In this manner,meter 100 is not left in an inconsistent state, and can continueoperating with a previously programmed set of parameters. (Previously,meters would lose their programs entirely if programming wereinterrupted.)

If the new program is not successfully written into the inactivesegment, then microcomputer 114 does not change the designation of theactive segment and metering continues with the program stored in theactive segment. Specifically, the metering data collected during theattempted update is processed using the program in the active segmentand metering operations continue.

Diagnostics

The following diagnostic operations are performed by meter microcomputer114. Of course, additional diagnostic operations could be performed bymicrocomputer 114, and fewer than all the diagnostic operationsdescribed below could be implemented. Set forth below are exemplarydiagnostic operations and a description of the manner in which toperform such operations. In one exemplary embodiment, diagnostics 1-5and 8 are checked once every 5 seconds. Also in this embodiment,diagnostics 6 and 7 are checked once every second. A programmable numberof consecutive failures are permitted for diagnostics 1-5 and 8, andanother, different, programmable number of consecutive failures arepermitted for diagnostics 6 and 7 before a diagnostic error results.

Diagnostic #1 (Polarity, Cross Phase, Rev. Energy Flow)

This diagnostic verifies that all meter elements are sensing the correctvoltage and current for the electrical service. In an exemplaryembodiment, this diagnostic is accomplished by comparing each voltageand current phase angle with expected values. In one specificembodiment, voltage phase angles must be within ten degrees of theexpected value and current phase angles must be within 120 degrees ofthe expected value to prevent a diagnostic 1 error.

Diagnostic #2 (Phase Voltage Alert)

This diagnostic verifies that the voltage at each phase is maintained atan acceptable level with respect to the other phases. In an exemplaryembodiment, and for diagnostic 2 tests, the A phase voltage is combinedwith the user programmed percentage tolerance to determine theacceptable range for the B and C phases voltages as appropriate for theANSI form and service type. For a 4 wire delta service, Vc is scaledbefore being compared to Va. In one embodiment, this diagnostic is notperformed if V_(a) is bad.

Diagnostic #3 (Inactive Phase Current)

This diagnostic verifies that the current of each phase is maintained atan acceptable level. A diagnostic 3 error condition is triggered if thecurrent of one or more phases, as appropriate for the ANSI form andservice type, falls below a user programmed low current value and atleast one phase current remains above this value.

Diagnostic #4 (Phase Angle Alert)

This diagnostic verifies that the current phase angles fall within auser a specified range centered on expected values. In an exemplaryembodiment, diagnostic #4 is enabled only if diagnostic #1 is enabledand is checked only if diagnostic #1 passes. The user programmed currentphase angle tolerance value for diagnostic #4 has a range of zero toninety degrees in increments of {fraction (1/10)} degree.

Diagnostic #5 (Distortion Alert)

This diagnostic verifies that the user-selected form of distortionmeasured on each individual element and, in the case of distortion powerfactor, across all elements, is not excessive. This diagnostic isselectable to monitor one of the following distortion measures.

-   -   Distortion Power Factor (DPF), per element and summed    -   Total Demand Distortion (TDD), per element only    -   Total Harmonic Current Distortion (ITHD), per element only    -   Total Harmonic Voltage Distortion (VTHD), per element only, if a        valid element.        A diagnostic 5 error condition is triggered if any of the        distortion calculations exceed a user-specified threshold.

Four counters are associated with diagnostic 5 (one counter for eachelement, and for DPF only, and one counter for the total of allelements). In an exemplary embodiment, diagnostic 5 is checked only whenthe one second kW demand exceeds a user programmed threshold which isthe same demand threshold used for the power factor threshold output.The user programmed distortion tolerance value for diagnostic 5 has arange of 0 to 100% in increments of 1%.

Diagnostic 6 (Undervoltage, Phase A)

This diagnostic verifies that the phase A voltage is maintained above anacceptable level. In an exemplary embodiment, the user programs anundervoltage percentage tolerance for diagnostic 6 that has a range of 0to 100% in increments of 1%. A diagnostic 6 error condition is triggeredif the voltage at phase A falls below the reference voltage (Vref) minusthe undervoltage percentage tolerance (T).

Fail Condition: Va<Vref(100%−T %), for a programmable number ofconsecutive checks.

The threshold used for diagnostic 6 is also used for the potentialannunciators.

Diagnostic #7 (Overvoltage, Phase A)

This diagnostic verifies that the phase A voltage is maintained below anacceptable level. In an exemplary embodiment, the user programs anovervoltage percentage tolerance for diagnostic 7 that has a range of 0to 100% in increments of 1%. A diagnostic 7 error condition is triggeredif the voltage at phase A rises above the reference voltage (Vref) plusthe overvoltage percentage tolerance (T).Fail Condition: Va>Vref(100%+T %)

Diagnostic #8 (High Imputed Neutral Current)

This diagnostic verifies that the imputed neutral current is maintainedbelow an acceptable level. In an exemplary embodiment, a diagnostic 8error condition is triggered if the imputed neutral current exceeds auser-programmed threshold. Form 45 and 56 as 4WD and 4WY applicationsare not valid services for determining the imputed neutral values. Inthese cases, the imputed neutral is zeroed after the service type hasbeen determined.

Meter 100 includes an event log stored in meter memory for capturinginformation about events. The event log is used, for example, to storethe occurrence of events, such as a diagnostic condition sensed as aresult of performing one of the tests described above.

In addition, and using complex I/O board 138, an output can be generatedby microcomputer 114 to such board 138 to enable remote determination ofa diagnostic failure. Such capability is sometimes referred to as aDiagnostic Error Alert. When configured for a diagnostic error alert,the following designation may be used to correlate a diagnostic errorcondition to an output.

Function Bit Diagnostic 1 0 Diagnostic 2 1 Diagnostic 3 2 Diagnostic 4 3Diagnostic 5 4 Diagnostic 6 5 Diagnostic 7 6 Diagnostic 8 7For example, an output of 01010101 provides a diagnostic error alert fordiagnostic tests 1,3,5, and 7.

When one of the selected diagnostics is set, the output is set. When allselected diagnostics are cleared, the output is cleared. Diagnosticoperations are not performed when meter 100 is determining theelectrical service.

Programmable Durations

In one specific embodiment, the diagnostic tests described above, exceptdiagnostics 6 and 7 (undervoltage and overvoltage), are performed every5 seconds using one second worth of data. Diagnostics 6 and 7 areperformed every second. If a diagnostic fails each check performedduring a programmed duration which begins with the first failed check,the diagnostic error is set and the diagnostic counter is incremented.

In an exemplary embodiment, two programmable diagnostic fail durationsare provided. One programmable fail duration is for diagnostics 6 and 7,and one programmable fail duration for the other diagnostics. The failduration for diagnostics 6 and 7 is programmable from 3 seconds to 30minutes in 3 second increments. The fail duration for the remainingdiagnostics is programmable from 15 seconds to 30 minutes in 15 secondincrements.

In the exemplary embodiment, two consecutive error free checks arerequired to clear a diagnostic error condition. The range for alldiagnostic counters is 0 to 255. When a diagnostic counter reaches 255,it must be reset by a user. Diagnostic errors and counters may be resetvia communications procedures.

Totalizations

As explained above, meter 100 includes a measurement profile 204 thataccepts external inputs. The external inputs can, for example, be pulseinputs from other meters associated with a load, e.g., a manufacturingplant. The external inputs can be collected, scaled (e.g., everyminute), and then totaled (i.e., summed together) to provide a quantityof total energy consumed from one plant. The totalized value can then bestored in one location. In addition, internal quantities can betotalized (e.g., user-selected quantities can be totalized).

Data Accumulators

In one embodiment, microcomputer 114 includes a 64 KB on-board RAM,microcomputer 114 is programmed to accumulate values in its RAM, andthese accumulated values are then subsequently displayed on display 124.By programming microcomputer 114 to store and accumulate data in thismanner, meter 100 can accumulate metering data for display to anoperator. Moreover, a utility company can monitor many quantitieswithout having data by time of use rate, demand reset, seasonal change,etc.

Load Profile

Electricity meters typically store integrated quantities as load profiledata. In addition to adding quantities, meter 100 can be programmed tostore the maximum and minimum or most recent quantities, i.e., meter 100can track non-integrated quantities. A user, therefore, can select up to20 quantities for recording. Accordingly, microcomputer 114 isprogrammed to compare the maximum and minimum values at every intervalwith the stored quantities, and if a new maximum or minimum is detected,the new maximum or minimum is stored in the appropriate recorderchannel.

Demand

As with load profile data, microcomputer 114 is programmed to comparethe demand value at every interval with a stored maximum demand in, forexample, the on-board RAM. If the current demand is greater than thestored maximum demand, then the current demand is copied over the storedmaximum demand and stored. In addition, for non-integrated quantities,momentary by momentary interval comparisons can also be performed.

Coincident Power Factors

Meter 100 is configurable to determine multiple types of demands, suchas kW, kVAr, kVA, and distortion KVA. For each demand, there are other,e.g., two, coincident values. Accordingly, meter microcomputer 114determines, on each interval, demand values and compares the calculateddemand values to the stored maximum values. If one of the thencalculated values is greater than the corresponding demand stored value,i.e., the current value is the maximum, then the value of the otherdemands is of interest. Specifically, power factor is the quotent of twoof the demands, and two coincident power factors can be determined andstored. For example, if there are five demand types, an operator canspecify that upon the occurrence of a maximum demand, two coincidentpower factor values are stored, e.g., Demand 1/Demand 2 and Demand3/Demand 4.

Multiple Distortion Measurements

Meter microcomputer 114 also is configured to calculate distortion powerfactor for each element (e.g., distortion Vah/apparent Vah).Microcomputer 114 also calculates a sum of the element distortion powerfactors, and V_(THD), I_(THD), and T_(DD), all per element. Theequations used to calculate these values are well known. In meter 100,the multiple distortion measurements are available for display, and thecalculations are performed every momentary interval.

Bidirectional Measures

Microcomputer 114 is further configured to determine, for everymomentary interval, the quadrant in which user-selected quantities andother metering quantities such as watthours are being measured. As iswell known in the art, the quadrants are defined by real (Wh) andimaginary (VAR). Meter 100 therefore tracks the quadrant in which energyis being received/delivered. Such measurements are specified by the userin measurement profile 204.

Transformer Loss Compensation

Microcomputer 114 is configured to compensate for energy losses thatoccur within distribution transformers and lines. Such compensation isenabled if a user selects this option. Transformer loss compensation(TLC) is applied to momentary interval per element Wh, Varh, and Vahdata. The transformer model for loss compensation is based on thefollowing relationships with metered voltage and current as variables.

-   -   No-load (core) (iron) loss watts are proportional to V²    -   Load (copper) loss watts are proportional to I²    -   No-load (core) (iron) loss vars are proportional to V⁴    -   Load (copper) loss vars are proportional to I²    -   Line losses are considered as part of the transformer copper        losses.        Every momentary interval, the signed losses for each element        (x=a, b, c) are determined using the TLC constants and the        measured momentary interval V²h and I²h for each element:        LWhFe_(x)=iron loss watt hours=V _(x) ² h*G         LWhCU _(x)=copper loss watt hours=I _(x) ² h*R        LVarhFE _(x)=iron loss var hours=(V _(x) ² h/h)*V _(x) ² h*B/V ²        LVarhCU _(x)=copper loss var hours=I _(x) ² h*X        Compensated watt hours and var hours are then determined for        each element by adding the signed losses to the measured        momentary interval watthours and var hours.        Compensated W _(x) h=measured W _(x) h+LWhFE _(x) +LWhCU _(x)        Compensated Varh _(x)=measured Varh+LVarhFE _(x) +LVarCU _(x)        Momentary VAh calculations are made using the compensated        watthours and var hours. The distortion component of the Vah        value is not compensated for transformer losses.        Pending Actions

When operating in a time-of-use mode, a user may desire to implement anew real-time pricing schedule. In one embodiment, microcomputer 114also checks every 15 minutes for a real-time pricing command.

More specifically, microcomputer 114 includes a real-time pricing modefor executing a specified real-time pricing (RTP) rate for as long asreal-time pricing is active. Microcomputer 114 enters the RTP mode by,for example, a dedicated input from a modem board or an I/O board 130,or by a pending or immediate action. The inputs for RTP include settingan RTP procedure flag which indicates whether to enter or exit RTP. ARTP activation delay (time in minutes) delays entering RTP after theinput has been activated. In one specific embodiment, the delay isprogrammable from 0 to 255 minutes.

During power-up, the saved RTP procedure flag and time remaining untilRTP activation are retrieved from EEPROM 120 by microcomputer 114. Aftermicrocomputer 114 completes its initialization tasks, the following taskare performed.

-   -   If the power outage crossed one or more quarter-hour boundaries,        microcomputer 114 determines whether a pending RTP action was        scheduled for one of the crossed quarter-hour boundaries.    -   If an RTP action was scheduled, microcomputer 114 determines        what the pending RTP action was, and if the action was to enter        RTP, microcomputer 114 enters RTP and sets the RTP procedure        flag. The RTP activation delay does not delay entering the RTP        rate via the pending action.    -   If the RTP pending action was to exit RTP, the RTP procedure        flag is cleared.    -   If the RTP pending action was to exit RTP or no pending RTP        action was scheduled to start during the outage, microcomputer        114 checks the status of the RTP input and the status of the RTP        procedure flag. If RTP has been activated, or the enter RTP        command had been sent prior to the power failure, microcomputer        114 checks the RTP activation delay timer. If the timer is zero,        microcomputer 114 enters the RTP rate. Otherwise, microcomputer        114 enters the RTP rate after the timer expires.

During normal operation, microcomputer 114 checks the status of the RTPinput. When microcomputer 114 detects that the RTP input has changedstate from inactive to active, microcomputer 114 checks the programmedactivation delay time. If the delay time is zero, microcomputer 114enters the RTP rate. Otherwise, microcomputer 114 sets the activationdelay timer and enters the RTP rate when the timer has expired.

During RTP mode operations, microcomputer 114 continues to calculatedata accumulations, and average power factor and demands are calculatedas when in the TOU metering mode. When the RTP signal is de-activated,microcomputer 114 checks the status of the RTP procedure flag. If theRTP procedure flag is not set, microcomputer 114 exits the RTP mode.Otherwise, microcomputer 114 remains in the RTP mode until the exit RTPimmediate procedure is received or a pending exit RTP action isexecuted.

When microcomputer 114 exits RTP, microcomputer 114 returns to the TOUrate in effect for the time and date when the RTP ends. Microcomputer114 processes any unprocessed summations and demand data. For block androlling demand, the demand intervals end.

In one embodiment, meter 100 is also able to automatically install a newTOU schedule when a pending date/time is reached. This feature allows anew calendar and/or tier structure with setpoints. Generally,microprocessor 114 checks, at midnight of every day, for a pending TOUschedule. If, for example, a TOU schedule is pending for September 1 atmidnight, the pending TOU schedule is loaded and becomes active.

Voltage Sags and Swells

The term voltage sag refers to a situation in which a phase voltagefalls below a predetermined level, and the term voltage swell refers toa situation in which a phase voltage rises above a predetermined level.Voltage sags and swells generally are power quality concerns, andtypically are associated with brown outs and similar events. In meter100, and if a voltage sag or swell is detected, an event is logged inthe event log, and the voltages and currents per event (e.g., maximumand minimum voltage and current per phase) are stored.

Thresholds are selected to compare the current voltage values against.Specifically, a sag threshold and a swell threshold are determined. For120 to 480 V services, an exemplary threshold is:${{INT}\left( {{Voltage}^{2}\quad{units} \times \frac{1\quad{hr}}{3600\quad\sec} \times \frac{1\quad{sample}}{{SF} \times {Voltage}^{2}\quad{hr}} \times 2 \times \frac{1\quad\sec}{3281.25\quad{samples}} \times 2^{24}} \right)},$where SF is a scale factor equal to 3125×10⁻⁶. For 57 to 120 V services,an exemplary threshold is given by the above equation, whereSF=500×10⁻⁶.

Mean voltages can be determined in accordance with the following:$\frac{{V2x\_ cycle}{\_ acum}}{{sample}\quad{count}} \times {2^{8}.}$Given the number of units in a cycle and the sample count, the meanmeasurement in volts is: $\sqrt{\begin{matrix}{\left( \frac{\#\quad{units}}{cycle} \right) \times \left\lbrack \frac{{SF} \times V^{2}}{2 \times 2^{16}} \right\rbrack \times \left\lbrack {3600\quad\sec\text{/}{hr}} \right\rbrack \times} \\\left\lbrack {3281.25\quad{samples}\text{/}\sec \times \frac{1\quad{cycle}}{{sample}\quad{count}}} \right\rbrack\end{matrix}} = \sqrt{\frac{\#\quad{units} \times {SF} \times 90.122}{{sample}\quad{count}}}$The V² cycle accumulations are accumulated every sample.Remote Upgrade

Converting meter operation refers to enabling a user to selectivelyoperate the meter in different metering modes, such as selectivelyoperating a meter either a time of use (TOU) or demand metering mode.Specifically, and as described below in more detail, a user can convertmeter operation from a demand only mode to a time of use mode, forexample. In one form, the meter has three different modes. These modesare the demand only mode, the demand with load profile mode (sometimesreferred to in the art as the demand with timekeeping mode), and the TOUmode.

In general, and in accordance with one aspect of the present invention,a soft switch is associated with optional features, and the soft switchenables remote upgrade and downgrade of the meter. The routinesassociated with the optional features are stored in meter memory, andwhen the soft switch for a particular feature is enabled, the routinefor the enabled feature is executed, and tables become visible.Similarly, when the soft switch for a particular feature is not enabled,the routine for the not-enabled feature is not executed and tables areno longer visible.

Examples of optional features enabled and disabled by soft switches arelisted below.

-   -   TOU    -   Expanded Measures    -   Basic Recording/Self-read    -   Event Log    -   Alternate Communications    -   DSP Sample Output    -   Pulse Initiator Output    -   Channel Recording/Self-reads    -   Totalization    -   transformer Loss Compensation    -   Transformer Accuracy Adjustment    -   Revenue Guard Plus    -   Voltage Event Monitor    -   Bi-Directional Measurements    -   Waveform Capture.

To downgrade meter function, e.g., remotely using a remote computercommunicating with the meter via a communications option board, themeter memory is read to determine which soft switches are installed. Anoperator then selects a soft switch to be removed, and the appropriatefile associated with the switch is disabled. If a significant changewill result in removal of a switch, e.g., removing a TOU switch in a TOUmeter, a warning message is displayed to the operator requestingconfirmation that the selected switch should be removed.

To upgrade a meter, an operator selects a soft switch to be installed.The soft switch is then enabled in the meter and the particular tablesand routines associated with the function for that switch are utilizedduring meter operations.

Additional details regarding upgrade/downgrade are set forth in U.S.patent application Ser. No. 08/565,464, filed Nov. 30, 1995, now U.S.Pat. No. 5,742,512, issued Apr. 21, 1998, and entitled ELECTRONICELECTRICITY METERS, which is assigned to the present assignee and herebyincorporated herein, in its entirety, by reference. In this application,at least some operations described as being performed in the DSP wouldbe performed in the microcomputer of the present meter.

Meter Form Types

Meter 100 includes instruction sets identifying processing steps to beexecuted to determine line voltages and line currents for respectivemeter form types. Such instruction sets are stored, for example, inmicrocomputer memory. Microcomputer 114 is configured to receive acontrol command via optical port 122, and microcomputer 114 thenprocesses the data received from ADC 112 in accordance with the selectedinstruction set.

The underlying process steps to make calculations such as reactive powerand active power are dependent upon the meter form and the electricalcircuit in which the meter is connected. For example, the meter formtypes includes meter ANSI form 9 and meter ANSI form 16 type forms, thenumber of elements may be 3, 2, 2½, or 1, and there are a number ofcircuit configurations in which the meter can be connected. The meterform, elements, and circuit configurations affect the inputs received bymicrocomputer 114 and the meter operation. Additional details regardingsuch operations are set forth in U.S. patent application Ser. No.08/857,322, filed May 16, 1997, and entitled AN ELECTRONIC ELECTRICITYMETER CONFIGURABLE TO OPERATE IN A PLURALITY OF METER FORMS AND RATINGS,which is assigned to the present assignee and hereby incorporatedherein, in its entirety, by reference. In this application, at leastsome operations described as being performed in the DSP would beperformed in the microcomputer of the present meter.

It will thus be seen that the above-described embodiments of the presentinvention increase the flexibility of an electronic electricity meter byproviding methods and apparatus for communicating and addressing avariety of input/output options, including different types of I/Oboards, and that these embodiments provide increased meter functionalityand flexibility.

While the invention has been described in terms of various specificembodiments, those skilled in the art will recognize that the inventioncan be practiced with modification within the spirit and scope of theclaims.

1. A method for input/output (I/O) board addressing and communicationsin an electronic electricity meter having a microcomputer, said methodcomprising the steps of: providing interchangeable I/O boards of anelectronic electricity meter with type identifiers; and determining,using a microcomputer of the meter and the type identifier of the I/Oboard, a type of interchangeable I/O board being utilized in the meter.2. A method in accordance with claim 1 wherein providing I/O boards withtype identifiers comprises the step of providing type identifiers as3-bit addresses.
 3. A method in accordance with claim 1 whereindetermining the type of I/O board utilized in the meter comprises themicrocomputer communicating with the I/O board via an option connector.4. A method in accordance with claim 1 wherein the meter includes anoptical communications port utilizing a phototransistor to communicate,said method further comprising the step of maintaining a constantvoltage across the phototransistor as an output of the phototransistorchanges between a first state and a second state.
 5. A method inaccordance with claim 4 wherein maintaining a constant voltage acrossthe phototransistor comprises using a current to voltage converter tomaintain the constant voltage.
 6. A method in accordance with claim 5wherein using a current to voltage converter to maintain the constantvoltage comprises electrically connecting an operational amplifierconfigured as a current to voltage converter to the phototransistor. 7.A method in accordance with claim 1 further comprising the step ofinstalling an additional I/O board in the meter and determining, usingthe microcomputer, a type of the additional I/O board.
 8. A method inaccordance with claim 1 further comprising the steps of performing adiagnostic check of the meter and communicating a diagnostic errorcondition via an I/O board.
 9. A method for input/output (I/O) boardaddressing and communications in an electronic electricity meter havinga microcomputer and an optical communications port utilizing aphototransistor to communicate, said method comprising the steps ofmaintaining a constant voltage across the phototransistor; and switchingthe phototransistor output to change between a first state and a secondstate while the constant voltage is maintained.
 10. A method inaccordance with claim 9 wherein maintaining a constant voltage acrossthe phototransistor comprises the step of utilizing an operationalamplifier configured as a current to voltage converter to maintain aconstant voltage of the phototransistor.
 11. An electronic electricitymeter having a microcomputer having an option connector configured toreceive interchangeable input/output (I/O) boards having typeidentifiers, said meter being configured to determine, using saidmicrocomputer and the type identifier of the I/O board, a type of I/Oboard being utilized in said meter.
 12. A meter in accordance with claim11 wherein said microcomputer is configured to determine typeidentifiers as 3-bit addresses.
 13. A meter in accordance with claim 11wherein said meter being configured to determine a type of I/O boardutilized in said meter comprises said microcomputer communicating withthe I/O board via said option connector.
 14. A meter in accordance withclaim 11 further comprising an optical communications port having aphototransistor for communicating an optical signal, said meter furtherconfigured to maintain a constant voltage across said phototransistor asan output of said phototransistor changes between a first state and asecond state.
 15. A meter in accordance with claim 14 wherein said meterbeing configured to maintain a constant voltage across saidphototransistor comprises said meter having a current to voltageconverter configured to maintain said constant voltage across saidphototransistor.
 16. A meter in accordance with claim 15 wherein saidcurrent to voltage converter comprises an operational amplifier.
 17. Ameter in accordance with claim 11 configured to accept a plurality ofsaid interchangeable I/O boards and to determine, using saidmicrocomputer, a type of each of said plurality of I/O boards.
 18. Ameter in accordance with claim 11 further configured to performdiagnostic checks and to communicate diagnostic error conditions via oneof said interchangeable I/O boards.
 19. An electronic electricity meterhaving a microcomputer and an optical communications port utilizing aphototransistor to communicate, said meter being configured to: maintaina constant voltage across said phototransistor; and switch saidphototransistor output to change between a first state and a secondstate while said constant voltage is maintained.
 20. A meter inaccordance with claim 19 wherein said meter being configured to maintaina constant voltage across said phototransistor comprises said meterhaving an operational amplifier configured as a current to voltageconverter to maintain a constant voltage of said phototransistor.